#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sqlalchemy import INT, Column, ForeignKey, Integer, Table

from backend.app.core.models import MappedBase

dbms_instance_tag = Table(
    'dbms_instance_tag',
    MappedBase.metadata,
    Column('id', INT, primary_key=True, unique=True, index=True, autoincrement=True, comment='主键ID'),
    Column('instance_id', Integer, ForeignKey('dbms_instance.id', ondelete='CASCADE'), primary_key=True, comment='实例ID'),
    Column('tag_id', Integer, ForeignKey('dbms_tag.id', ondelete='CASCADE'), primary_key=True, comment='tagID'),
)